﻿package cn.kxm.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import cn.kxm.pojo.*;
public interface CompanyMapper {

	public List<Company> findAll(@Param("code")String code,
			@Param("name")String name,@Param("type")Integer type,
			@Param("page")Integer page,@Param("size")Integer size);

	public int getCount(@Param("code")String code,
			@Param("name")String name,@Param("type")Integer type);
	
	public List<Company> getCompanys(@Param("types")List<Integer> types,@Param("name")String name,@Param("code")String code,@Param("currPage")Integer currPage,@Param("size")Integer size);
	
    public int getCompanyCount(@Param("types")List<Integer> types,@Param("name")String name,@Param("code")String code);
    /**getgetCompanyCount
	 * 根据条件查询供应商信息
	 * @param company
	 * @param pageSize
	 * @param currentPageNo
	 * @return
	 */
	public List<Company>getCompanyAll(@Param("company")Company company,@Param("pageSize")Integer pageSize
			,@Param("currentPageNo")Integer currentPageNo);
	
	/**
	 * 根据条件查询供应商数量
	 * @param company
	 * @return
	 */
	public int getCompanyCountt(@Param("company")Company company);
	public int getCompanyCounttt(@Param("company")Company company);
	/**
	 * 根据条件查询相关供应商及详细信息
	 * @param company
	 * @param pageSize
	 * @param currentPageNo
	 * @return
	 */
	public List<Map<String, Object>> getCompany_Detiail(@Param("company")Company company,@Param("pageSize")Integer pageSize
			,@Param("currentPageNo")Integer currentPageNo);
	/**
	 * 根据编号查询供应商明细信息
	 * @param code
	 * @return
	 */
	public Map<String, Object> getCompanydetailsByCode(@Param("code")String code);
	/**
	 * 添加供应商信息
	 * @param company
	 * @return
	 */
	public int addCompany(@Param("company")Company company);
	/**
	 * 添加供应商明细
	 * @param companydetail
	 * @return
	 */
	public int addCompanydetail(@Param("companydetail")Companydetail companydetail);
	
	/**
	 * 修改供应商明细
	 * @param companydetail
	 * @return
	 */
	public int modifyCompanydetail(@Param("companydetail")Companydetail companydetail);
	/**
	 * 修改供应商
	 * @param companydetail
	 * @return
	 */
	public int modifyCompany(@Param("company")Company company);
	/**
	 * 删除供应商明细
	 * @param companydetail
	 * @return
	 */
	public int delCompanydetail(@Param("code")String  code);
	/**
	 * 删除供应商
	 * @param code
	 * @return
	 */
	public int delCompany(@Param("code")String code);
}
